package com.bt.dmdb.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bt.dmdb.dao.QuestionDao;
import com.bt.dmdb.model.Question;
import com.bt.dmdb.model.QuestionDTO;
import com.bt.dmdb.model.QuestionRDTO;
import com.bt.dmdb.service.QuestionService;
@Service("questionService")
@Transactional(value = "txmDmdb")
public class QuestionServiceImpl implements QuestionService{

	@Resource
	private QuestionDao questionDao;
	
	@Override
    @Transactional(value = "txmDmdb", readOnly = true)
	public List<Question> fetchFfeQuestions() {
		// TODO Auto-generated method stub
		return questionDao.fetchFfeQuestions();
	}
	
	@Override
   // @Transactional(value = "txmDmdb", readOnly = false)
	public String saveSpecificFFIAnswers(QuestionDTO y) {
		// TODO Auto-generated method stub
		return questionDao.saveSpecificFFIAnswers(y);
	}

	@Override
	   // @Transactional(value = "txmDmdb", readOnly = false)
		public String saveSpecificNFFEAnswers(QuestionDTO y) {
			// TODO Auto-generated method stub
			return questionDao.saveSpecificNFFEAnswers(y);
		}
	
	
	@Override
	public String saveMakerFFIAnswers(String custID, String quesId0,
			String ansId0, String quesId1, String ansId1, String explanation,
			String quesId2, String ansId2, String fatcaStatusFFI) {
		// TODO Auto-generated method stub
		return questionDao.saveMakerFFIAnswers( custID,  quesId0,
			 ansId0,  quesId1,  ansId1,  explanation,
			   quesId2,  ansId2, fatcaStatusFFI);
	}
	
	@Override
	public String saveMakerNFFEAnswers(String custID,String quesId0,String ansId0,
    		String quesId1,String ansId1,
      		String explanation,
      		String quesId2,String ansId2, 
      		String quesId3,String ansId3, 
      		String quesId4,String ansId4, 
      		String quesId5,String ansId5, 
      		String quesId6,String ansId6, String fatcaStatus) {
		// TODO Auto-generated method stub
		return questionDao.saveMakerNFFEAnswers( custID,quesId0,ansId0,
	    		quesId1,ansId1,
	      		explanation,
	      		quesId2,ansId2, 
	      		quesId3,ansId3, 
	      		quesId4,ansId4, 
	      		quesId5,ansId5, 
	      		quesId6,ansId6, fatcaStatus);
	}
	@Override
	public Question findQuestionById(long id){
		return questionDao.findQuestionById(id);
	}
	
	@Override
	public String findClassification(Long id){
		return questionDao.findClassification(id);
	}

	
	@Override
	public String saveCheckerFinalStatus(QuestionRDTO y) {
		// TODO Auto-generated method stub
		return questionDao.saveCheckerFinalStatus(y);
	}
}
